from odoo import api, fields, models


class InheritMrp(models.Model):
    _inherit = "mrp.bom"

    bom_img = fields.Image(
        related='product_id.image_1024',
        string='产品图片'
    )

    bom_tmpl_img = fields.Image(
        related='product_id.image_1920',
        string='产品图片'
    )


class InheritMrpBomLine(models.Model):
    _inherit = "mrp.bom.line"

    bom_img = fields.Image(
        related='product_id.image_1024',
        string='产品图片'
    )




